package com.unionftech.content_login.contract

import com.unionftech.common.base.mvp.IBasePresenter
import com.unionftech.common.base.mvp.IBaseView
import com.unionftech.common.base.mvp.impl.IBaseCallBack
import com.unionftech.common.bean.ResponseResult
import com.unionftech.content_login.bean.request.ForgetPasswordRequest

interface LoginContract {

    interface ILoginModel {
        /**
         * 登录
         */
        fun login(
            account: String, password: String,
            callBack: IBaseCallBack<ResponseResult<Any?>>? = null,
        )

        /**
         * 网易一键登录
         */
        fun thirdlogin(
            token: String,
            accessToken: String,
            type: Int,
            callBack: IBaseCallBack<ResponseResult<Any?>>? = null,
        )

        /**
         * 退出登录
         */
        fun logout(callBack: IBaseCallBack<ResponseResult<Any?>>)

        /**
         * 重置密码
         */
        fun resetPassword(
            request: ForgetPasswordRequest,
            callBack: IBaseCallBack<ResponseResult<Any?>>
        )
    }

    interface ILoginView : IBaseView {
        fun handleLoginResult(response: ResponseResult<Any?>)
    }

    interface ILoginPresenter : IBasePresenter {
        fun login(account: String, password: String)

        fun logout()
    }


    interface ILogoutView : IBaseView {
        fun handleLogout(response: ResponseResult<Any?>)
    }

    interface IForgotView : IBaseView {
        fun handleResult(response: ResponseResult<Any?>)
    }

    interface IForgotPresenter : IBasePresenter {
        fun resetPassword(request: ForgetPasswordRequest)
    }

}